package com.djq.project.mq.consumer.rpc;

import com.djq.project.mq.consumer.topics.TopicsConfig;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class RecvRpc {
    @RabbitListener(queues = RpcConfig.RPC_QUEUE_NAME)
    @RabbitHandler
    public String routingB(String in) {
        in+=in+" 被处理后!";
        System.out.println(" ["+RpcConfig.RPC_QUEUE_NAME+"] Received '" + in + "'");
        return in;
    }
}
